$('#submit').click(function(){
    if($('#mobile').val() != undefined && $('#mobile').val()==""){
        $.Dialog.fail("请填写手机号！");//成功调用 提示一秒后自动关闭
        return false;
    }
    else if($('#code').val() != undefined && $('#code').val()==""){
        $.Dialog.fail("请填写手机号！");//成功调用 提示一秒后自动关闭
        return false;
    }
    else{
        $.Dialog.loading();
        var phone = $('#mobile').val();
        var verifyCode = $('#code').val();
        $.ajax({
            url:bindemployee.CheckedEmployee,
            type:"post",
            data:{phone: phone, code:verifyCode},
            dataType:"json",
            success:function(data){
                switch (data.statu){
                    case 0:
                        $.Dialog.success(data.data);
                        setTimeout(function(){
                            wx.closeWindow();
                        },2000);
                        break;
                    case 1:
                        $.Dialog.fail(data.data);
                        break;
                }
            }
        });
    }
});
$(function(){
    if(bindemployee.IsEmployee == 1){
        var successHtml = "<div class='common_dialog lqcg'>"
            +"<h6>温馨提示</h6><p class='p_10'>尊敬的" + bindemployee.name + ", 您已经绑定了微信号</p>"
            +"<div class='tb'><a class='btn m_15 flex_1' href='#' onClick='$.Dialog.close(); wx.closeWindow(); ;'>返回公众号</a></div>"
            +"</div>";
        $.Dialog.open(successHtml);
    }
});